package cate.game.role.friend.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBFriend;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "处理好友申请 の 请求")
public class FriendApplyHandleReq implements MsgInput {
    @NoteField(value = "申请者的唯一ID",detail = "不传为一键同意或拒绝")
    public String applicantIdHex;

    @NoteField(value = "是否通过请求")
    public boolean ok;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        cc.getRole().getFriend().handle(applicantIdHex, ok);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBFriend.APPLY_HANDLE_REQ;
    }
}
